<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />

  <title>Launching Perl Programs</title>
  <link href="book.css" rel="stylesheet" type="text/css" />
  <meta content="DocBook XSL-NS Stylesheets V1.73.0" name="generator" />
  <link rel="start" href="index.html" title="EPIC - User's Guide" />
  <link rel="up" href="ch06.html" title="Using the Perl Debugger" />
  <link rel="prev" href="ch06.html" title="Using the Perl Debugger" />
  <link rel="next" href="ch06s02.html" title="Creating Launch Configurations" />
</head>

<body>
  <div class="section" lang="en" xml:lang="en">
    <div class="titlepage">
      <div>
        <div>
          <h2 class="title" style="clear: both"><a id="N10690" name="N10690"></a>Launching Perl
          Programs</h2>
        </div>
      </div>
    </div>

    <p>You may launch your Perl programs from the workbench. Programs may be launched in either run
    or debug mode.</p>

    <div class="itemizedlist">
      <ul type="disc">
        <li>
          <p>In run mode, the program executes, but may not be suspended or examined.</p>
        </li>

        <li>
          <p>In debug mode, execution may be suspended and resumed, variables may be inspected, and
          expressions may be evaluated.</p>
        </li>
      </ul>
    </div>

    <p>The environment a Perl program is to be executed in is defined via "Launch Configurations".
    A launch configuration defines</p>

    <div class="itemizedlist">
      <ul type="disc">
        <li>
          <p>if the program is to be executed in a CGI or normal Perl environment</p>
        </li>

        <li>
          <p>the host the program is to be executed on</p>
        </li>

        <li>
          <p>the program to execute</p>
        </li>

        <li>
          <p>execution parameters to pass</p>
        </li>

        <li>
          <p>environment variables</p>
        </li>

        <li>
          <p>configuration data for the web server used to provide the CGI framework</p>
        </li>
      </ul>
    </div>

    <div class="section" lang="en" xml:lang="en">
      <div class="titlepage">
        <div>
          <div>
            <h3 class="title"><a id="N106B1" name="N106B1"></a>Launching Perl Programs in Run
            Mode</h3>
          </div>
        </div>
      </div>

      <div class="screenshot">
        <div class="mediaobject" align="center">
          <img src="images/run_diag.gif" align="middle" alt="Run Configurations Dialog" />
        </div>
      </div>

      <div class="orderedlist">
        <ol type="1">
          <li>
            <p>Select <span class="guimenu">Run</span> → <span class="guimenuitem">Run...</span>
            from the Eclipse menu.</p>
          </li>

          <li>
            <p>Within the appearing dialog, select the configuration type:</p>

            <div class="itemizedlist">
              <ul type="disc">
                <li>
                  <p>Perl Local: Run a Perl script on the local machine</p>
                </li>

                <li>
                  <p>Perl CGI: Run Perl programs in a CGI environment on the local machine</p>
                </li>

                <li>
                  <p>Perl Remote: Run a Perl script on a remote machine</p>
                </li>
              </ul>
            </div>

            <p>and press the New button to create a new launch configuration.</p>
          </li>

          <li>
            <p>Adjust launch configuration attributes. For details see <a class="xref" href=
            "ch06s02.html" title="Creating Launch Configurations">the section called “Creating
            Launch Configurations”</a>.</p>
          </li>

          <li>
            <p>Press the <span class="guibutton">Run</span> button.</p>
          </li>
        </ol>
      </div>

      <p>This executes the program. The program's console output will be shown in the console
      window. For "Perl Local" and "Perl Remote" configurations, the console window also accepts
      keyboard input to be passed to the program.</p>

      <p>If you switch to the debug view, you have additional control over the execution of the
      program. For details see <a class="xref" href="ch06s04.html#debug-view" title=
      "Debug View">the section called “Debug View”</a>.</p>
    </div>

    <div class="section" lang="en" xml:lang="en">
      <div class="titlepage">
        <div>
          <div>
            <h3 class="title"><a id="N106F0" name="N106F0"></a>Re-launching a Perl Program</h3>
          </div>
        </div>
      </div>

      <p>The workbench keeps a history of each launched and debugged program. To relaunch a
      program, do one of the following:</p>

      <div class="itemizedlist">
        <ul type="disc">
          <li>
            <p>Select a previous launch from <span class="guimenu">Run</span> or <span class=
            "guimenu">Debug</span> button pull-down menus.</p>
          </li>

          <li>
            <p>From the menu bar, select <span class="guimenu">Run</span> → <span class=
            "guimenuitem">Run History</span> or <span class="guimenu">Run</span> → <span class=
            "guimenuitem">Debug History</span> and select a previous launch from these
            sub-menus.</p>
          </li>

          <li>
            <p>In the Debug view, select a process that you want to relaunch, and select
            <span class="guimenuitem">Relaunch</span> from the process's pop-up menu.</p>
          </li>
        </ul>
      </div>

      <p>To relaunch the most recent launch, do one of the following:</p>

      <div class="itemizedlist">
        <ul type="disc">
          <li>
            <p>Click the <span class="guibutton">Run</span> or <span class="guibutton">Debug</span>
            buttons (without using the button pull-down menu).</p>
          </li>

          <li>
            <p>Select <span class="guimenu">Run</span> → <span class="guimenuitem">Run Last
            Launched</span> (<span class="keycap"><strong>Ctrl</strong></span>+<span class=
            "keycap"><strong>F11</strong></span>), or <span class="guimenu">Run</span> →
            <span class="guimenuitem">Debug Last Launched</span> (<span class=
            "keycap"><strong>F11</strong></span>) from the workbench menu bar.</p>
          </li>
        </ul>
      </div>
    </div>
  </div>
</body>
</html>
